Fix a compilation warning
authorJavier Jardón <jjardon@gnome.org>
Tue, 20 Oct 2009 18:43:44 +0000 (20:43 +0200)
committerJavier Jardón <jjardon@gnome.org>
Tue, 20 Oct 2009 18:43:44 +0000 (20:43 +0200)
Catch the returned value of write()

modules/other/gail/tests/ferret.c

index 14281deb218a535d7b0c338ac83363794ed4aa1d..531651bddb39f82e846e24b69362e067eb3f5f36 100644 (file)
@@ -429,11 +429,14 @@ static void _send_to_festival (const gchar *role_name,
 
 static void _festival_write (const gchar *command_string, int fd)
 {
+  gssize n_bytes;
+
   if (fd < 0) {
     perror("socket");
     return;
   }
-  write(fd, command_string, strlen(command_string));
+  n_bytes = write(fd, command_string, strlen(command_string));
+  g_assert (n_bytes == strlen(command_string));
 }
 
 static void _speak_caret_event (AtkObject *aobject)